package org.javaboy.demo.model;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class Dog implements InitializingBean, DisposableBean {
    public Dog() {
        System.out.println("Dog-Constructor");
    }

    /**
     * 自定义的 dog 初始化方法
     */
    public void init() {
        System.out.println("Dog-init");
    }

    /**
     * 自定义的 Dog 销毁方法
     */
    @Override
    public void destroy() {
        System.out.println("Dog-destroy");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("Dog-afterPropertiesSet");
    }
//    public void close() {
//        System.out.println("Dog-close");
//    }
}
